ip/ffmpeg: reset swr_frame_start when seeking
authorihy123 <aladinandreyy@gmail.com>
Sun, 17 Aug 2025 12:54:19 +0000 (15:54 +0300)
committerSebastian Ramacher <sramacher@debian.org>
Fri, 12 Sep 2025 21:00:35 +0000 (23:00 +0200)
Gbp-Pq: Name 0010-ip-ffmpeg-reset-swr_frame_start-when-seeking.patch

ip/ffmpeg.c

index c659c133009a501e3867c1e7d602287402bede0c..71cc5111668b286f1ee2324ce461179260283216 100644 (file)
@@ -444,6 +444,7 @@ static int ffmpeg_seek(struct input_plugin_data *ip_data, double offset)
                return -IP_ERROR_FUNCTION_NOT_SUPPORTED;
 
        priv->swr_frame->nb_samples = 0;
+       priv->swr_frame_start = 0;
        avcodec_flush_buffers(priv->codec_ctx);
        swr_convert(priv->swr, NULL, 0, NULL, 0); /* flush swr buffer */
        return 0;